Ext.define('Era.controller.EventBar',{
    extend: 'Ext.app.Controller',
    views: ['EventBar'],
 
    refs: [{
        ref: 'viewport',
        selector: 'viewport'
    }],
 
    init: function() {
        this.control({
            'button[action=main_menu]': {
                click: this.onShowMainMenu
            }
        });
    },
    
    onShowMainMenu: function(button) {
        var viewport = this.getViewport();
        var eventbar = viewport.down('eventbar');
        var mainmenu = viewport.mainMenu;

        mainmenu.show();
        mainmenu.alignTo(eventbar,'tr-tr',[0,34]);
    }
 
});

